# num_one = 12
# def sum(num_two):
#     global num_one
#     num_one = 90
#     return num_one + num_two
# print(sum(10))
#
# def many_param(num_cone,num_two,*args):
#     print(args)
# many_param(11,22,33,44,55)

# 兔子数列
# def fibonacci(month):
#     if month == 0 or month == 1:
#         return 1
#     else:
#         return fibonacci(month-1) + fibonacci(month-2)
# result = fibonacci(12)
# print(result)
# 归并排序
# def merge_sort(li):
#     n = len(li)
#     if n == 1:
#         return  li
#     mid = n // 2
#     left = li[:mid]
#     right = li[mid:]
#     left_res = merge_sort(left)
#     right_res = merge_sort(right)
#     result = merge(left_res, right_res)
#     return result
# def merge(left, right):
#     result = []
#     left_index = 0
#     right_index = 0
#     while left_index < len(left) and right_index < len(right):
#         if left[left_index] <= right[right_index]:
#             result.append(left[left_index])
#             left_index += 1
#         else:
#             result.append(right[right_index])
#             right_index += 1
#     result += right[right_index:]
#     result += left[left_index:]
#     return  result
# if __name__ == '__main__':
#     list_demo = [6, 5, 7, 4, 3, 1]
#     print(merge_sort(list_demo))

# 学生管理系统
# 1.添加学生信息
# def add_student():
#     name = str(input("请输入你的学生名字："))
#     age = int(input("请输入你的学生年龄："))
#     sex = int(input("请选择学生的性别：1.男，2.女"))

# 2.删除学生信息
# def del_student(name,age,sex):
#     del name
#     del age
#     del sex

# 3.修改学生信息
# def replace_student(name,age,sex):
#     name = str(input("修改学生名字："))
#     age = str(input("修改学生年龄："))
#     if sex == 1:
#         sex == '2'
#     elif sex == 2:
#         sex == 1

# 查询所有学生信息
# def index_all_student():
#
#
# # 退出系统
# # def exit_system():
# #     return 0
#
# name = ''
# age = 0
# sex = ''
# add_student()

# stu_info = []
# # 打印菜单
# def print_menu():
#     print('='*30)
#     print('学生管理系统v10.0')
#     print('1.添加学生信息')
#     print('2.删除学生信息')
#     print('3.修改学生信息')
#     print('4.查询所以学生信息')
#     print('0.退出系统')
#     print('='*30)
# # 添加学生功能
# def add_stu_info():
#     new_name = input('请输入新学生的姓名：')
#     new_sex = input('请输入新学生的性别：')
#     new_phone = input('请输入新学生的手机号码：')
#     new_info = dict()
#     new_info['name'] = new_name
#     new_info['sex'] = new_sex
#     new_info['phone'] = new_phone
#     stu_info.append(new_info)
# # 删除学生功能
# def del_stu_info(student):
#     del_num = int(input('请输入要删除的序号：')) - 1
#     del student[del_num]
#     print("删除成功！")
# # 修改学生信息功能
# def modify_stu_info():
#     if len(stu_info) != 0:
#         stu_id = int(input('请输入要修改学生的序号：'))
#         new_name = input('请输入要修改学生的姓名：')
#         new_sex = input('请输入要修改学生的性别：(男/女)')
#         new_phone = input('请输入要修改学生的手机号码：')
#         stu_info[stu_id - 1]['name'] = new_name
#         stu_info[stu_id - 1]['sex'] = new_sex
#         stu_info[stu_id - 1]['phone'] = new_phone
#     else:
#         print('学生信息表为空')
# # 显示所有学生信息功能
# def show_stu_info():
#     print('学生的信息如下')
#     print('='*30)
#     print('序号    姓名     性别     手机号码')
#     i = 1
#     for tempInfo in stu_info:
#         print("%d    %s    %s     %s" % (i,tempInfo['name'],tempInfo['sex'],tempInfo['phone']))
#         i += 1
# # main()函数
#
# def main():
#     while True:
#         print_menu()
#         key = input("请输入功能对应的数字：")
#         if key == '1':
#             add_stu_info()
#         elif key == '2':
#             del_stu_info(stu_info)
#         elif key == '3':
#             modify_stu_info()
#         elif key == '4':
#             show_stu_info()
#         elif key == '0':
#             quit_confirm = input('亲，真的要退出么？(Yes or No):').lower()
#             if quit_confirm == 'yes':
#                 print("谢谢使用！")
#                 break
#             elif quit_confirm == 'no':
#                 continue
#             else:
#                 print('输入有误！')
#
# if __name__ == '__main__':
#     main()
